/*
 * @Author: silence silence9685@163.com
 * @Date: 2023-04-24 11:43:45
 * @LastEditors: silence silence9685@163.com
 * @LastEditTime: 2023-04-24 11:47:57
 * @FilePath: \lenercom_bluetooth_app\lib\common\widgets\cubitWidget\BottonLineBtn.dart
 * @Description: 底部有线的按钮
 */
import 'package:flutter/material.dart';
import 'package:sil_base_widget_package/sil_base_widget_package.dart';

import '../../../utils/color/ColorUtils.dart';

class BottonLineBtn extends StatelessWidget {
  final String? title;
  final void Function()? onTap;
  final EdgeInsetsGeometry? margin;
  const BottonLineBtn({this.title, this.onTap,this.margin, Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return lineBtn(title: this.title, onTap: this.onTap);
  }

  lineBtn({String? title, void Function()? onTap}) {
    return GestureDetector(
      behavior: HitTestBehavior.translucent,
      onTap: onTap,
      child: Container(
        margin: this.margin ?? EdgeInsets.only(top: 33.w),
        decoration: BoxDecoration(
            border:
                Border(bottom: BorderSide(color: ColorUtils.color_font_main))),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            SilText(
              title,
              fontSize: 14,
              color: ColorUtils.color_font_main,
              fontWeight: FontWeight.w400,
            ),
          ],
        ),
      ),
    );
  }
}
